<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <ul>
      <li>1</li>
      <li>2</li>
      <li>3</li>
    </ul>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <script>
      $(() => {
        // 在 第2个 li 末尾插入 一段 dom
        $('<span class="icon">一个图标x</span>').appendTo($('ul > li:nth-child(2)'))

        // tip: 要插入的 jq元素调用 api
      })
    </script>
  </body>
</html>
